import Vue from 'vue'
import Router from 'vue-router'
// 导入刚才编写的组件
import AppIndex from '@/components/home/AppIndex'
import Login from '@/components/Login'


import Interface_test from '@/components/interface/InterfaceTest'
import Case_manage from '@/components/interface/CaseManage'
import Case_report from '@/components/interface/caseReport'
import Case_task from '@/components/interface/CaseTask'
import case_Log from '@/components/interface/CaseLog'

import Home_page from '@/components/home/HomePage'

import Project_name from '@/components/projectSetting/ProjectName'
import Service_name from '@/components/projectSetting/ServiceName'
import Dns_partner from '@/components/projectSetting/DnsPartner'

import SqlManager from "@/components/template/manager"
import DbConfig from "@/components/template/dbconfig"
import ProjectConfig from "@/components/template/projectconfig"

Vue.use(Router)

export default new Router({
  routes: [
    // 下面都是固定的写法
    {
      path: '/',
      name: 'Login',
      component: Login,
      meta: {title: '登录',},
    },
    {
      path: '/index',
      name: 'AppIndex',
      component: AppIndex,
      meta: {title: '首页'},
      // 子路由
      children:[
        {
          path: '/homePage',
          name: 'HomePage',
          component: Home_page,
          meta: {title: '首页'},
        },
        {
          path: '/dnsPartner',
          name: 'Dns_partner',
          component: Dns_partner,
          meta: {title: '域名信息'},
        },

        {
          path: '/projectName',
          name: 'ProjectName',
          component: Project_name,
          meta: {title: '项目信息'},
        },
        {
          path: '/serviceName',
          name: 'ServiceName',
          component: Service_name,
          meta: {title: '服务信息'},
        },
        {
          path: '/caseManage',
          name: 'CaseManage',
          component: Case_manage,
          meta: {title: '用例管理'},
        },
        {
          path: '/interfaceTest',
          name: 'interfaceTest',
          component: Interface_test,
          meta: {title: '接口自动化'},
        },
        {
          path: '/caseReport',
          name: 'caseReport',
          component: Case_report,
          meta: {title: '接口自动化报告'},
        },
        {
          path: '/caseTask',
          name: 'caseTakst',
          component: Case_task,
          meta: {title: '用例定时任务'},
        }, 
        {
          path: '/caseLog',
          name: 'caselog',
          component: case_Log,
          meta: {title: '用例执行记录'},
        },   
        {
          path: '/dbconfig',
          name: 'dbconfig',
          component: DbConfig,
          meta: {title: '数据库配置'},
        },
        {
          path: '/projectconfig',
          name: 'projectconfig',
          component: ProjectConfig,
          meta: {title: '项目配置'},
        },
            
      ]
    }
    
  ]
})
